package com.huluobo.a2112mvvmdouyindemo.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2112mvvmdouyindemo.R;
import com.huluobo.a2112mvvmdouyindemo.utils.ImageLoader;
import com.huluobo.mvvm_base.bean.HomeVideoBeanResult;

import java.util.List;

/**
 * Created by LC on 2024/3/25.
 */
public class HomeTabAdapter extends BaseQuickAdapter<HomeVideoBeanResult.HomeVideoBean, BaseViewHolder> {
    public HomeTabAdapter(@Nullable List<HomeVideoBeanResult.HomeVideoBean> data) {
        super(R.layout.item_home_tab_video, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, HomeVideoBeanResult.HomeVideoBean homeVideoBean) {
        baseViewHolder.setText(R.id.item_home_tab_desc_tv, homeVideoBean.getCaption());
        ImageLoader.getInstance().loadCircleImage(getContext(), homeVideoBean.getVideomainimg(),
                baseViewHolder.getView(R.id.item_home_tab_video_iv));
    }
}
